PeekBankFloat
FloatValue# = PeekBankFloat(BankNumber, AddressOffset)
 
Parameters:

    BankNumber = The Index Identifier of the bank that you wish to peek
    AddressOffset = The Address where you want to read this data from within the bank
Returns:

    FloatValue# = The Value that was peeked from memory
 

     PeekBankFloat allows you to peek (read) a 32bit floating point from a memory bank.



FACTS:


     * 32bit floats are single precision.
     * 32bit floats are 4 bytes wide.




Mini Tutorial:


      This simple example creates a bank, pokes some Float values into it then displays them again.

  
  
  
; Create Memory Bank #1 and make it 1000 bytes in size
  CreateBank 1,1000
  
  
; ================================================
; Store some 32bit Floating Point values into the bank
; ================================================
; Poke the Floating POint value 123.456 into memory bank 1 at
; address offset 500
  
  PokeBankFloat 1500123.456
  
; Poke next Floating POint value 33.33 at 504. So it doesn't overwrite
; the previous poke.
  
  PokeBankFloat 150433.33
  
  
; Read And Display the previously poke value again.
  Print "Your Float Value:"+Str$(PeekBankFloat(1,500))
  
; Read And Display the previously poke value again.
  Print "Your Float Value:"+Str$(PeekBankFloat(1,504))
  
  
; Display the Screen And Wait For the user To press a key
  Sync
  WaitKey
  
  



This example would output.

  
  Your Float Value: 123.456
  Your Float Value: 33.33
  


 
Related Info: CreateBank | PeekBankByte | PeekBankInt | PeekBankString | PeekBankWord | PokeBankByte | PokeBankFloat | PokeBankInt | PokeBankString | PokeBankWord :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com